﻿using System.Windows;

namespace DBProject2.View
{
    /// <summary>
    /// Interaction logic for DataBaseView.xaml
    /// </summary>
    public partial class DataBaseView : Window
    {
        public DataBaseView()
        {
            InitializeComponent();
            
        }

        protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
        {
            string msg = "All unsaved changes will be lost. Continue anyway?";
            string caption = "Warning";

            var result = MessageBox.Show(msg,
                                         caption,
                                         MessageBoxButton.YesNo,
                                         MessageBoxImage.Question);

            if (result == MessageBoxResult.Yes)
                base.OnClosing(e);
            else
                e.Cancel = true;
        }
    }
}